package indzcraft.loader;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import indzcraft.calc.Weapon;

public class BaseStats {
	
	private String race = "";
	
	private int str = 0;
	private int agi = 0;
	private int ap = 0;
	private int crit = 0;
	private int mastery = 0;
	private int exp = 0;
	private int hit = 0;
	private int haste = 0;
	
	private Weapon mh;
	private Weapon oh;
	
	private HashMap<String,Integer> setItems = new HashMap<String,Integer>();
	private List<String> gearBuffs = new ArrayList<String>();
	
	private String[] talents = new String[3];
	private String talentsName;
	
	private String[] offTalents = new String[3];
	private String offTalentsName;
	
	private List<String> professions = new ArrayList<String>();

	private List<String> glyphs = new ArrayList<String>();
	private List<String> offGlyphs = new ArrayList<String>();
	
	public BaseStats(){
		
	}
	
	public BaseStats(int str,int agi, int ap, int crit, int exp, int haste, int hit, int mastery) {
		this.str = str;
		this.agi = agi;
		this.ap = ap;
		this.crit = crit;
		this.exp = exp;
		this.haste = haste;
		this.hit = hit;
		this.mastery = mastery;
	}
	
	public void incStr(int i){
		str += i;
	}
	public void incAgi(int i){
		agi += i;
	}
	public void incAp(int i){
		ap += i;
	}
	public void incCrit(int i){
		crit += i;
	}
	public void incExp(int i){
		exp += i;
	}
	public void incHaste(int i){
		haste += i;
	}
	public void incHit(int i){
		hit += i;
	}
	public void incMastery(int i){
		mastery += i;
	}
	
	public int getStr() {
		return str;
	}
	public int getAp() {
		return ap;
	}
	public int getCrit() {
		return crit;
	}
	public int getMastery() {
		return mastery;
	}
	public int getExp() {
		return exp;
	}
	public int getAgi(){
		return agi;
	}
	public int getHit(){
		return hit;
	}
	public int getHaste(){
		return haste;
	}
	public void setMH(Weapon w){
		mh = w;
	}
	public void setOH(Weapon w){
		oh = w;
	}
	public Weapon getMH(){
		return mh;
	}
	public Weapon getOH(){
		return oh;
	}
	public void setRace(String race) {
		this.race = race;
	}
	public String getRace() {
		return race;
	}
	public int getNumberOfSetItems(String setname){
		if(!this.setItems.containsKey(setname))
			return 0;
		return this.setItems.get(setname);
	}
	public HashMap<String,Integer> getSetItems(){
		return setItems;
	}
	public void addSetItem(String setname){
		if(!this.setItems.containsKey(setname))
			   this.setItems.put(setname, 1);
		   else
			   this.setItems.put(setname, setItems.get(setname)+1);
	}
	public void setTalents(String tree1,String tree2,String tree3){
		talents[0] = tree1;
		talents[1] = tree2;
		talents[2] = tree3;
	}
	public String[] getTalents(){
		return talents;
	}
	
	public void setOffTalents(String tree1,String tree2,String tree3){
		offTalents[0] = tree1;
		offTalents[1] = tree2;
		offTalents[2] = tree3;
	}
	public String[] getOffTalents(){
		return talents;
	}
	
	public void addGearBuff(String name){
		gearBuffs.add(name);
	}
	public List<String> getGearBuffs(){
		return gearBuffs;
	}
	public void setGearBuffs(List<String> gearBuffs){
		this.gearBuffs = gearBuffs;
	}

	public void setTalentsName(String talentsName) {
		this.talentsName = talentsName;
	}

	public String getTalentsName() {
		return talentsName;
	}
	
	public void setOffTalentsName(String talentsName) {
		this.offTalentsName = talentsName;
	}

	public String getOffTalentsName() {
		return offTalentsName;
	}
	
	public void addProfession(String name){
		professions.add(name);
	}
	public List<String> getProfessions(){
		return professions;
	}

	public void addGlyph(String name) {
		glyphs.add(name);
	}
	
	public void addOffGlyph(String name) {
		offGlyphs.add(name);
	}
	
	public void setGlyphs(List<String> g){
		glyphs = g;
	}
	public List<String> getGlyphs(){
		return glyphs;
	}
	
	public void setOffGlyphs(List<String> g){
		offGlyphs = g;
	}
	public List<String> getOffGlyphs(){
		return offGlyphs;
	}
}
